package com.sens.mybank.utils;

import android.content.Context;

import com.sens.common.ApplicationUtil;
import com.sens.common.Base64;
import com.sens.exception.PermissionException;

public class MybankUtils {
    private static final String packageName = new String(Base64.decode("Y29tLm15YmFuay5hbmRyb2lkLnBob25l"));

    /**
     * 检测是否安装网商银行
     */
    public static boolean checkInstalled(Context context) {
        return ApplicationUtil.checkInstalled(context, packageName);
    }

    /**
     * 判断网商银行是否已经启动
     */
    public static boolean isRunning(Context context) throws PermissionException {
        return ApplicationUtil.isRunning(context, packageName);
    }

    /**
     * 启动网上银行
     */
    public static void startMybank(Context context) {
        ApplicationUtil.startApp(context, packageName);
    }
}